{{ $redirect_to := replaceRE `\.html$` "" (replace .Permalink "?" "%3F") }}
<html lang="en">
 <head>
  <meta charset="utf-8">
  <title>Redirecting&hellip;</title>
  <link rel="canonical" href="{{ $redirect_to }}">
  <meta http-equiv="refresh" content="0; url={{ $redirect_to }}">
  <meta name="robots" content="noindex">
 </head>
 <body>
  <script>window.location.replace(document.querySelector("link[rel='canonical']").href + window.location.search + window.location.hash)</script>
  <h1>Redirecting&hellip;</h1>
  <a href="{{ $redirect_to }}">Click here if you are not redirected.</a>
 </body>
</html>

